<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 600px;
            height: 600px;
            border: 5px solid gray;
            display: grid;
            grid-template-rows: repeat(3,100px);
            grid-template-columns: repeat(3,100px);

            /* grid-auto-flow: column; */
            /* 改变顺序 */

            /* justify-content: center; */
            /* 横向 */
            /* align-content: center; */
            /* 纵向 */
            place-content: center center;
            /* 复合属性 */
            place-items: center center;

            /*  属性值： 
                    start
                    end
                    center
                    stretch    当没有指定项目大小时，拉伸
                    space-around
            */
        }
        .box div{
            border: 1px solid green;
            width: 50px;
            height: 50px;
            text-align: center;
            line-height: 50px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
        <div>8</div>
        <div>9</div>
    </div>
</body>
</html>